package com.nine.demo.quartzdemo.job;

import org.quartz.InterruptableJob;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.UnableToInterruptJobException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Description:
 * @Author: 刘超
 * @Date: 2023-05-29 8:46
 */
public class InterruptTestJob implements InterruptableJob {
    private final Logger logger = LoggerFactory.getLogger(getClass());
    @Override
    public void interrupt() throws UnableToInterruptJobException {
        logger.info("job interrupted...");
    }

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        logger.info("InterruptTestJob executing...");
    }
}
